package com.liberty.dasheen.common.util;

import java.util.Date;

public class SearchFilter {
	private String userCode;
	private String consumeType;
	private Date consumeTime;
	private Integer pageSize;
	private Integer pageNum;
	public String getUserCode() {
		return userCode;
	}
	public void setUserCode(String userCode) {
		this.userCode = "%" + userCode + "%";
	}
	public String getConsumeType() {
		return consumeType;
	}
	public void setConsumeType(String consumeType) {
		this.consumeType = consumeType;
	}
	public Date getConsumeTime() {
		return consumeTime;
	}
	public void setConsumeTime(Date consumeTime) {
		this.consumeTime = consumeTime;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public Integer getPageNum() {
		return pageNum;
	}
	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}
	
	public Integer getStart() {
		return (this.getPageNum() - 1) * this.getRows();
	}
	public Integer getRows() {
		return this.getPageSize();
	}
	
	
	@Override
	public String toString() {
		return "SearchFilter [userCode=" + userCode + ", consumeType=" + consumeType + ", consumeTime=" + consumeTime
				+ ", pageSize=" + pageSize + ", pageNum=" + pageNum + "]";
	}
}
